use "$datapath/004_het_results_fullsample_cog_simple_K50_LL.dta", clear
keep b*_HetSymm se*_HetSymm truncation
gen ub_HetSymm = b_HetSymm+1.645*se_HetSymm
gen lb_HetSymm = b_HetSymm-1.645*se_HetSymm

gen ubA_HetSymm = bA_HetSymm+1.645*seA_HetSymm
gen lbA_HetSymm = bA_HetSymm-1.645*seA_HetSymm

gen ubL_HetSymm = bL_HetSymm+1.645*seL_HetSymm
gen lbL_HetSymm = bL_HetSymm-1.645*seL_HetSymm

gen ubAL_HetSymm = bAL_HetSymm+1.645*seAL_HetSymm
gen lbAL_HetSymm = bAL_HetSymm-1.645*seAL_HetSymm

local xtitle="L{sub:max}"
local ytitle="Estimate of {&beta}"
local ytitle_A="Estimate of {&beta}{sub:A}"
local ytitle_L="Estimate of {&beta}{sub:L}"
local ytitle_AL="Estimate of {&beta}{sub:AL}"
local yrange="-1.5 1.5"
local yrange_A="-1.5 1.5"
local yrange_L="-.1 .1"
local yrange_AL="-.1 .1"
gen zero=0
keep if truncation>=70
**********************************************************************************
* PLOTS
**********************************************************************************
twoway (rarea lb_HetSymm ub_HetSymm truncation, color(gs10%50)) || ///
		(line b_HetSymm truncation, lcolor(black) ) || (line zero truncation, lcolor(black) lpattern(dash)), scheme(s1mono) legend(off) ///
					xlabel(500(500)3000) ytitle(`ytitle') xtitle(`xtitle', size(large)) title("") note("") yscale(range(`yrange')) ylabel(-1.5(.5)1.5)
graph export "$figpath/beta_lin50_het.pdf", replace		


*******
twoway (rarea lbA_HetSymm ubA_HetSymm truncation, color(gs10%50)) || ///
		(line bA_HetSymm truncation, lcolor(black) ) || (line zero truncation, lcolor(black) lpattern(dash)), scheme(s1mono) legend(off) ///
					xlabel(500(500)3000) ytitle(`ytitle_A') ylabel(-1.5(.5)1.5) xtitle(`xtitle', size(large)) title("") note("") yscale(range(`yrange_A'))
graph export "$figpath/betaA_lin50_het.pdf", replace		
*******
